Optimal. Leaf size=35 \[ \frac{(a C+b B) \tanh ^{-1}(\sin (c+d x))}{d}+\frac{a B \tan (c+d x)}{d}+b C x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.171184, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.132, Rules used = {3029, 2968, 3021, 2735, 3770} \[ \frac{(a C+b B) \tanh ^{-1}(\sin (c+d x))}{d}+\frac{a B \tan (c+d x)}{d}+b C x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3029
Rule 2968
Rule 3021
Rule 2735
Rule 3770
Rubi steps
\begin{align*} \int (a+b \cos (c+d x)) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx &=\int (a+b \cos (c+d x)) (B+C \cos (c+d x)) \sec ^2(c+d x) \, dx\\ &=\int \left (a B+(b B+a C) \cos (c+d x)+b C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx\\ &=\frac{a B \tan (c+d x)}{d}+\int (b B+a C+b C \cos (c+d x)) \sec (c+d x) \, dx\\ &=b C x+\frac{a B \tan (c+d x)}{d}-(-b B-a C) \int \sec (c+d x) \, dx\\ &=b C x+\frac{(b B+a C) \tanh ^{-1}(\sin (c+d x))}{d}+\frac{a B \tan (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.0127727, size = 43, normalized size = 1.23 \[ \frac{a B \tan (c+d x)}{d}+\frac{a C \tanh ^{-1}(\sin (c+d x))}{d}+\frac{b B \tanh ^{-1}(\sin (c+d x))}{d}+b C x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.039, size = 65, normalized size = 1.9 \begin{align*} bCx+{\frac{bB\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{Ba\tan \left ( dx+c \right ) }{d}}+{\frac{aC\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{Cbc}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.01172, size = 99, normalized size = 2.83 \begin{align*} \frac{2 \,{\left (d x + c\right )} C b + C a{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + B b{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, B a \tan \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.39602, size = 225, normalized size = 6.43 \begin{align*} \frac{2 \, C b d x \cos \left (d x + c\right ) +{\left (C a + B b\right )} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (C a + B b\right )} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, B a \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.51948, size = 113, normalized size = 3.23 \begin{align*} \frac{{\left (d x + c\right )} C b +{\left (C a + B b\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) -{\left (C a + B b\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - \frac{2 \, B a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]